# -*- coding: utf-8 -*-
# @Time    : 2023/6/3 17:39
# @Author  : 刘张宇
# @Email   : 2285524065@qq.com
# @File    : .py
# @Software: PyCharm
from appium.webdriver.common.mobileby import MobileBy as By
from pages.base_page import BasePage

class AuthoringCenter(BasePage):
    authoring_center_locator = (By.XPATH, '//*[@resource-id="com.xiachufang:id/user_recipes_summary_tab_collects"]')#创作中心
    title_locator= (By.XPATH, '//*[@resource-id="com.xiachufang:id/user_recipes_summary_tab_collects_text"]')

    def menu_center(self):
        self.find_element(self.authoring_center_locator).click()#创作中心

    def task_first(self):
        current_task = self.find_element(self.title_locator).text()
        return current_task








